try :
    set
except :
    try :
        from sets import Set as set
    except :
        class set :
            def __init__ (self, iterable=[]) :
                self._set = {}
                for item in iterable :
                    self._set[item] = None
            def __iter__ (self) :
                return iter(list(self._set.keys()))
            def add (self, item) :
                self._set[item] = None
            def __eq__ (self, other) :
                return self._set == other._set
            def __len__ (self) :
                return len(self._set)
            def pop (self) :
                key, item = self._set.popitem()
                return key
            def remove (self, item) :
                del self._set[item]
            def update (self, iterable) :
                for item in iterable :
                    self._set[item] = None
            def __contains__ (self, item) :
                return item in self._set
            def __or__ (self, other) :
                result = self.copy()
                result.update(other)
                return result
            def copy (self) :
                result = set()
                result.update(self)
                return result
            def discard (self, item) :
                try :
                    self.remove(item)
                except :
                    pass
            def __sub__ (self, other) :
                result = self.copy()
                for item in other :
                    result.discard(item)
                return result
            def __le__ (self, other) :
                for item in self._set :
                    if item not in other._set :
                        return False
                return True

try :
    sorted
except :
    def sorted (iterable) :
        l = list(iterable)
        l.sort()
        return l

try :
    reversed
except :
    def reversed (iterable) :
        l = list(iterable)
        l.reverse()
        return l

try :
    enumerate
except :
    def enumerate (iterable) :
        result = []
        count = 0
        for item in iterable :
            result.append((count, item))
            count += 1
        return result
